/**
 * Copyright (C) 2008 Christopher Allen Ogden
 *
 *     This file is part of Odysi.
 *
 *  Odysi is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Odysi is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Odysi.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma pack(push)
#pragma pack(1)

namespace MapFileFormat {

    struct Header {
        unsigned int width;
        unsigned int height;
    };

    struct Block {
        unsigned short lower[8 * 8];
        unsigned short upper[8 * 8];
    };

    struct ObjectsHeader {
        unsigned short numItems;
        unsigned int offset;
    };

    struct ObjectInfo {
        unsigned char x : 4;
        unsigned char y : 4;
        unsigned short z;
        char xOffset;
        char yOffset;
        unsigned short id;
        unsigned char red;
        unsigned char green;
        unsigned char blue;
        unsigned char alpha;
    };
}

#pragma pack(pop)
